home *** CD-ROM | disk | FTP | other *** search
- Path: news.mindlink.net!news
- From: mike_huwe@mindlink.bc.ca (Mike Huwe)
- Newsgroups: comp.lang.c
- Subject: ***NEED HELP WITH CALCULATION FUNCTION*** ASAP
- Date: 11 Mar 1996 08:07:06 GMT
- Organization: Your Organization
- Message-ID: <4i0mva$j0c@fountain.mindlink.net>
- NNTP-Posting-Host: line032.nwm.mindlink.net
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.6
-
- I need to write a function called calc_investment() based on the following
- formula: P = F/(1+r)^n
-
- where P : is the value to invest
- F : is the future amount needed
- r : is the annual rate of interest
- n : is the length of the period
- ^ : power of
-
- The user is allowed to enter the annual rate of interest either as a
- percentage eg. 15 or enter as a decimal eg. .15. If the user enters the
- annual rate of interest as a percentage eg. 15, then divide by 100
- before using it in the formula.
-
- Any ideas how I could code this test?
-
- Please e-mail you responses.
-
- Thanks in advance,
- Mike
-
-